package cn.luowb.checkchat.dao.mapper;

import cn.luowb.checkchat.dao.entity.MessageDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Update;

/**
 * 针对表【message(用户留言表)】的数据库操作Mapper
 */
@Deprecated // 代码用于参考, 不使用
public interface MessageMapper extends BaseMapper<MessageDO> {

    /**
     * 点赞
     *
     * @param id 留言ID
     */
    @Update("update message set like_count = like_count + 1 where id = #{id}")
    void likeMessage(Long id);

    /**
     * 取消点赞
     *
     * @param id 留言ID
     */
    @Update("update message set like_count = like_count - 1 where id = #{id}")
    void unlikeMessage(Long id);
}




